using System;
using System.Text;

namespace iBeauty.BusinessObjects
{
	[Serializable()]
	public class BillDetail
	{
		private string _ID;

		public string ID
		{
			get { return _ID; }
			set { _ID = value; }
		}

		private DateTime? _CreateDate;

		public DateTime? CreateDate
		{
			get { return _CreateDate; }
			set { _CreateDate = value; }
		}

		private DateTime? _ModifiedDate;

		public DateTime? ModifiedDate
		{
			get { return _ModifiedDate; }
			set { _ModifiedDate = value; }
		}

		private DateTime? _TimeStamp;

		public DateTime? TimeStamp
		{
			get { return _TimeStamp; }
			set { _TimeStamp = value; }
		}

		private string _LineNo;

		public string LineNo
		{
			get { return _LineNo; }
			set { _LineNo = value; }
		}

		private string _ProductCode;

		public string ProductCode
		{
			get { return _ProductCode; }
			set { _ProductCode = value; }
		}

		private string _ProductName;

		public string ProductName
		{
			get { return _ProductName; }
			set { _ProductName = value; }
		}

		private string _Quantity;

		public string Quantity
		{
			get { return _Quantity; }
			set { _Quantity = value; }
		}

		private Double? _Price;

		public Double? Price
		{
			get { return _Price; }
			set { _Price = value; }
		}

		private Double? _Total;

		public Double? Total
		{
			get { return _Total; }
			set { _Total = value; }
		}

		private Double? _OddQuantity;

		public Double? OddQuantity
		{
			get { return _OddQuantity; }
			set { _OddQuantity = value; }
		}

		private Double? _Content;

		public Double? Content
		{
			get { return _Content; }
			set { _Content = value; }
		}

		private int? _UnitType;

		public int? UnitType
		{
			get { return _UnitType; }
			set { _UnitType = value; }
		}

		private DateTime? _ExpireDate;

		public DateTime? ExpireDate
		{
			get { return _ExpireDate; }
			set { _ExpireDate = value; }
		}

		private int? _AccountId;

		public int? AccountId
		{
			get { return _AccountId; }
			set { _AccountId = value; }
		}

		private string _Note;

		public string Note
		{
			get { return _Note; }
			set { _Note = value; }
		}

		public BillDetail()
		{ }

		public BillDetail(string ID,DateTime? CreateDate,DateTime? ModifiedDate,DateTime? TimeStamp,string LineNo,string ProductCode,string ProductName,string Quantity,Double? Price,Double? Total,Double? OddQuantity,Double? Content,int? UnitType,DateTime? ExpireDate,int? AccountId,string Note)
		{
			this.ID = ID;
			this.CreateDate = CreateDate;
			this.ModifiedDate = ModifiedDate;
			this.TimeStamp = TimeStamp;
			this.LineNo = LineNo;
			this.ProductCode = ProductCode;
			this.ProductName = ProductName;
			this.Quantity = Quantity;
			this.Price = Price;
			this.Total = Total;
			this.OddQuantity = OddQuantity;
			this.Content = Content;
			this.UnitType = UnitType;
			this.ExpireDate = ExpireDate;
			this.AccountId = AccountId;
			this.Note = Note;
		}

		public override string ToString()
		{
			return "ID = " + ID + ",CreateDate = " + CreateDate.ToString() + ",ModifiedDate = " + ModifiedDate.ToString() + ",TimeStamp = " + TimeStamp.ToString() + ",LineNo = " + LineNo + ",ProductCode = " + ProductCode + ",ProductName = " + ProductName + ",Quantity = " + Quantity + ",Price = " + Price.ToString() + ",Total = " + Total.ToString() + ",OddQuantity = " + OddQuantity.ToString() + ",Content = " + Content.ToString() + ",UnitType = " + UnitType.ToString() + ",ExpireDate = " + ExpireDate.ToString() + ",AccountId = " + AccountId.ToString() + ",Note = " + Note;
		}

		public class IDComparer : System.Collections.Generic.IComparer<BillDetail>
		{
			public SorterMode SorterMode;
			public IDComparer()
			{ }
			public IDComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<BillDetail> Membres
			int System.Collections.Generic.IComparer<BillDetail>.Compare(BillDetail x, BillDetail y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ID.CompareTo(x.ID);
				}
				else
				{
					return x.ID.CompareTo(y.ID);
				}
			}
			#endregion
		}
		public class LineNoComparer : System.Collections.Generic.IComparer<BillDetail>
		{
			public SorterMode SorterMode;
			public LineNoComparer()
			{ }
			public LineNoComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<BillDetail> Membres
			int System.Collections.Generic.IComparer<BillDetail>.Compare(BillDetail x, BillDetail y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.LineNo.CompareTo(x.LineNo);
				}
				else
				{
					return x.LineNo.CompareTo(y.LineNo);
				}
			}
			#endregion
		}
		public class ProductCodeComparer : System.Collections.Generic.IComparer<BillDetail>
		{
			public SorterMode SorterMode;
			public ProductCodeComparer()
			{ }
			public ProductCodeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<BillDetail> Membres
			int System.Collections.Generic.IComparer<BillDetail>.Compare(BillDetail x, BillDetail y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ProductCode.CompareTo(x.ProductCode);
				}
				else
				{
					return x.ProductCode.CompareTo(y.ProductCode);
				}
			}
			#endregion
		}
		public class ProductNameComparer : System.Collections.Generic.IComparer<BillDetail>
		{
			public SorterMode SorterMode;
			public ProductNameComparer()
			{ }
			public ProductNameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<BillDetail> Membres
			int System.Collections.Generic.IComparer<BillDetail>.Compare(BillDetail x, BillDetail y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ProductName.CompareTo(x.ProductName);
				}
				else
				{
					return x.ProductName.CompareTo(y.ProductName);
				}
			}
			#endregion
		}
		public class QuantityComparer : System.Collections.Generic.IComparer<BillDetail>
		{
			public SorterMode SorterMode;
			public QuantityComparer()
			{ }
			public QuantityComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<BillDetail> Membres
			int System.Collections.Generic.IComparer<BillDetail>.Compare(BillDetail x, BillDetail y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Quantity.CompareTo(x.Quantity);
				}
				else
				{
					return x.Quantity.CompareTo(y.Quantity);
				}
			}
			#endregion
		}
		public class NoteComparer : System.Collections.Generic.IComparer<BillDetail>
		{
			public SorterMode SorterMode;
			public NoteComparer()
			{ }
			public NoteComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<BillDetail> Membres
			int System.Collections.Generic.IComparer<BillDetail>.Compare(BillDetail x, BillDetail y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Note.CompareTo(x.Note);
				}
				else
				{
					return x.Note.CompareTo(y.Note);
				}
			}
			#endregion
		}
	}
}
